﻿//-----------------------------------------------------------------------
// <copyright file="IConsolePluginApi.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>18/08/2012</date>
//-----------------------------------------------------------------------
using ConsoleHoster.Common.Model;

namespace ConsoleHoster.Common.ViewModel
{
	/// <summary>
	/// Represents the API of the ConsoleProjectVM to be exposed to the plugins
	/// </summary>
	public interface IConsolePluginApi
	{
		/// <summary>
		/// Runs the specified contract on the console
		/// </summary>
		/// <param name="argCommandToRun">The command to execute</param>
		void RunCommand(string argCommandToRun);

		/// <summary>
		/// Requests a new favorite command to be created with the given name and location
		/// </summary>
		/// <param name="argName">The name of the command to create</param>
		/// <param name="argCommandText">The location the favorite command should redirect to</param>
		void AddFavoriteCommand(string argName, string argCommandText);

		/// <summary>
		/// Appends the given string to the existing command stirng
		/// </summary>
		/// <param name="argCommandPart">The text to append to the command</param>
		void AppendCommand(string argCommandPart);

		/// <summary>
		/// The name of the console
		/// </summary>
		string Name
		{
			get;
		}

		/// <summary>
		/// Gets the current folder for the console
		/// </summary>
		string CurrentFolder
		{
			get;
		}

		/// <summary>
		/// Gets the associated CommandHandlingManager responsible for custom comand processing
		/// </summary>
		ICommandHandlingManager CommandManager
		{
			get;
		}
	}
}
